package core.util.logging.constants;

public enum Action {
	
	CLICK("Click"),   // mouse
	DELETE("Delete"), // items in favorites 
	DRAGSTART("Drag"),   // items in file tree, favorites, viz
	DROP("Drop"), // end of drag
	SELECT("Select"), // items in the word list in viz
	UNSELECT("Unselect"), // ditto
	
	CLOSEDOC("Closing doc"),  // a tab
	SWITCHDOC("Switcing doc"), // of tabs
	
	HOVERENTER("Hovering enter"), // for edges and nodes in radial tree. 
	HOVEREXIT("Hovering end"), // ditto
	
	MOUSEENTER("Cursor enter"),  // one of the five UI areas
	MOUSEEXIT("Cursor exit"),
	
	QUERY("Edited query"), // search boxes
	CLEARQUERY("Cleared query with X"); // cleared by clicking on the 'x' button
	
	
	
	private String actionName; 
	
	private Action(String actionName){
		this.actionName = actionName;
	}
	
	public String toString() {
		return actionName;
	}
	
	public static String getClicks(int numClicks) {
		return numClicks + (numClicks == 1 ? " click" : " clicks"); 
	}
}
